<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:tiles="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title tiles:fragment="title">添加</title>

    <link href="../../../static/css/all.css" rel="stylesheet" type="text/css"/>
    <script src="../../../static/js/main.js"></script>
</head>

<body>

<div class="content" th:fragment="content" tiles:fragment="content">
    <div class="content-nav">
        <div class="titleNav">
            <div class="title_nav title_nav_previous">
                <a href="#new" onclick="returnTo('apply/addajax')">新建申请单</a>
            </div>
            <div class="title_nav title_nav_Now">
                <a>添加物品</a>
            </div>
        </div>
    </div>

    <div class="content-query myInput">
        <form id="query_input_info">
            <div class="content-query-left">
                <label>
                    物品条码：
                    <input type="text" name="itemCode"/>
                </label>
                <label>
                    物品名称：
                    <input type="text" name="itemName"/>
                </label>
                <label>
                    物品类别：
                    <select name="itemCategoryId">
                        <!--/*@thymesVar id="category" type="com.repository.entity.CategoryEntity"*/-->
                        <option value=""></option>
                        <option th:if="${session.categories == null || session.categories.empty}">
                            没有找到分类，请刷新重试
                        </option>
                        <option th:each="category : ${session.categories}"
                                th:value="${category.categoryId}"
                                th:text="${category.categoryName}">
                        </option>
                    </select>
                </label>
            </div>
            <div class="content-query-right icon-search">
                <input type="button" value="查询" onclick="searchItem('icon-plus')"/>
            </div>
        </form>
    </div>

    <div class="content-result myTable">
        <table id="query_item_result">
            <thead>
            <tr>
                <th>条码</th>
                <th>名称</th>
                <th>类别</th>
                <th>数量</th>
                <th>选择</th>
            </tr>
            </thead>
            <tbody></tbody>
        </table>
    </div>

    <div class="pop-bg">
    <div class="pop myInfoList myInput">
        <div class="pop-close">
            <div class="close_button" onclick="closePop()">
                <div class="close_button-icon"></div>
            </div>
        </div>
        <form id="info_of_apply_item">
            <ul>
                <li>
                    <label>
                        <div class="name">
                            物品条形码：
                        </div>
                        <div class="value">
                            <input type="text" name="itemCode" readonly="readonly"/>
                        </div>
                    </label>
                </li>
                <li>
                    <label>
                        <div class="name">
                            物品名称：
                        </div>
                        <div class="value">
                            <input type="text" name="itemName" readonly="readonly"/>
                        </div>
                    </label>
                </li>
                <li>
                    <label>
                        <div class="name">
                            申请数量：
                        </div>
                        <div class="value">
                            <input type="number" name="itemCount" min="0" required="required"/>
                        </div>
                    </label>
                </li>
                <li>
                    <label>
                        <div class="name">
                            申请备注：
                        </div>
                        <div class="value">
                            <input type="text" name="others"/>
                        </div>
                    </label>
                </li>
                <li>
                    <label>
                        <div class="name">
                            申请类型：
                        </div>
                        <div class="value">
                            <select name="applyType">
                                <option value="常规使用">常规使用</option>
                                <option value="特殊需求">特殊需求</option>
                                <option value="过期处理">过期处理</option>
                                <option value="库存清点">库存清点</option>
                                <option value="其他">其他</option>
                            </select>
                        </div>
                    </label>
                </li>
                <li>
                    <input type="button" onclick="closePop()" value="取消"/>
                    <input type="button" onclick="addItem()" value="增加物品"/>
                </li>
            </ul>
        </form>
    </div>
</div>
</div>

</body>
</html>